<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
</html>
<script !src="">
    //运用递归计算1-100的和
    function sum(n){
        if(n == 1){
            return 1;
        }
        return sum(n - 1) + n;
    }
    console.log(sum(100));

</script>
